<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        // [表达式]：中括号支持表达式 
        // 表达式：变量，运算符，函数调用
        

        let a = "age";
        let b = "sex"

        let obj = {
            name:"哈哈",
            [a]:500,
            [b]:"猴",
            [100+200]:'测试',
            ['hobb'+'y']:'香蕉',
            [10>5?'a':'b']:'哈哈',
            [fn()]:"100"

        };

        function fn(){
            return '测试';
        }

        console.log(obj);
    </script>
</body>
</html>